#!/usr/bin/env jq
# compile-config-0.00-init_objects -- Initializes the deepdive_ object for compilation
##

# duplicate the original deepdive config object
.deepdive_ = .deepdive | .deepdive_ as $deepdive

# make sure at least they are empty objects
| .deepdive_.schema                |= . + {}
| .deepdive_.schema.variables      |= . + {}
| .deepdive_.schema.relations      |= . + {}
| .deepdive_.extraction            |= . + {}
| .deepdive_.extraction.extractors |= . + {}
| .deepdive_.inference             |= . + {}
| .deepdive_.inference.factors     |= . + {}

# make sure our intermediate representation for execution plan set up
| .deepdive_.execution             |= . + {}
| .deepdive_.execution.processes   |= . + {}

# some default values
# allowing the initial process to be named something else
| .deepdive_.execution.process_init_app             |= (. // "process/init/app")
| .deepdive_.execution.process_init_relation_prefix |= (. // "process/init/relation/")
